// 专门封装用户相关的 API接口
import request from '@/utils/request.js'

// export function regAPI(obj) {
//   return request.post('/api/reg', obj)
// }

export const regAPI = (obj) => request.post('/api/reg', obj)
export const loginAPI = (obj) => request.post('/api/login', obj)
export const getuserAPI = () => request.get('/my/userinfo')
export const getMenuAPI = () => request.get('/my/menus')
export const updateUserAPI = (obj) => request.put('/my/userinfo', obj)
export const avatarAPI = (str) => request.patch('/my/update/avatar', { avatar: str })
export const updatePwdAPI = (obj) => request.patch('/my/updatepwd', obj)
